﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using HR.ProjectX.BLL.Messaging;
using HR.ProjectX.GUI.ViewModels.Menu;
using HR.ProjectX.BLL.Services.VehicleCategoryService;

namespace HR.ProjectX.GUI.Controllers
{
    public class MenuController : Controller
    {
        private readonly IVehicleCategoryService _vehicleService;

        public MenuController(IVehicleCategoryService vehicleService)
        {
            _vehicleService = vehicleService;
        }

        public ActionResult Menu()
        {
            GetAllVehicleCategoriesResponse response = _vehicleService.GetAllVehicleCategories();

            MenuView menuView = new MenuView();
            menuView.VehicleCategories = response.VehicleCategories;

            return PartialView(menuView);
        }

    }
}
